package edu.sctu.zhoudie.mouth201505.day20150510;

/**
 * Created by user08 on 2015/5/10.
 */
public class MyMainTwo {

    Data data;

    public MyMainTwo(Data data) {
        this.data = data;
    }

    public void total() {

        if (data.getAge() > 18) {
            System.out.println("成年");

        } else {
            System.out.println("未成年");
        }

        System.out.println("number = " + data.getNumber());
        System.out.println("name = " + data.getName());
        System.out.println("sex = " + data.getSex());
        System.out.println("age  = " + data.getAge());
    }
}
